<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>深入理解z-index</title>
  <style>
  .box {
    display: inline-block;
    /* border: 1px solid #cc0000; */
  }
  text {
    color: #FFF;
    position:absolute;
    margin-top: 161px;
    background-color: #000;
    width: 256px;
    height: 30px;
    line-height: 30px;
    text-align: center;
    vertical-align: middle;
    opacity: 0.6;
    /* 核心点: CSS opacity=1 是普通元素,无层叠上下文 */
  }
  </style>
</head>
<body>
  <div class="box">
    <text>看什么看,还不快叫师娘</text>
    <img src="../images/54447b06000171a002560191.jpg">
  </div>
  <div class="box">
    <text>看什么看,还不快叫师娘</text>
    <img src="../images/54447b06000171a002560191.jpg">
  </div>
</body>
</html>